<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>两栏布局</title>
  <style>
    html,
    body {
      padding: 0px;
      margin: 0;
      width: 100%;
      height: 100%;
      box-sizing: border-box;
    }

    .container {
      width: 100%;
      height: 100%;
      display: flex;
    }

    .left {
      width: 200px;
      height: 100%;
      background-color: pink;
    }

    .right {
      height: 100%;
      /* flex属性是flex-grow, flex-shrink 和 flex-basis的简写，默认值为0 1 auto。后两个属性可选。 */
      /* flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ] */
      flex: 1;
      background-color: bisque;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="left">左</div>
    <div class="right">右</div>
  </div>
</body>

</html>